I spent so many hours trying to make this work, I'm so glad I finally managed to do it!
The saving idea was wanding in the end (arm 23), without that finding a space for the gold output was a real pain.